package top.chatgqt.SmartChargeStation.mqtt.client.factory;

import lombok.extern.slf4j.Slf4j;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHandler;
import org.springframework.messaging.MessagingException;
import org.springframework.stereotype.Component;

/**
 * 接收消息的处理
 */
@Component
@Slf4j
public class InBoundMessageRev implements MessageHandler {

    @Override
    public void handleMessage(Message<?> message) throws MessagingException {
        // 接收消息的业务逻辑
        log.info("receive message: {}", message.getPayload().toString());
    }
}